$(function() {

	


	
	var iUl;
	var iList=6;
	// 点击分类显示不同分类里面的老师
	var ifenlei;
	$('.fenleiFuck li').click(function(event) {
			console.log('f');




		ifenlei=$(this).index();

		$(this).addClass('current').siblings('li').removeClass('current');
		$('.liebiaoFuck').eq(ifenlei).fadeIn('fast').siblings('ul').hide();
		// 显示前N个开始-----------------------------------------------------------
		// 获取当前显示的那个ul列表的index值···························
	
		iList=6;
		$('.liebiaoShow').each(function(index, element) {
			if ($(element).is(':hidden')) {}else{
				iUl=index;
				;};
			
		});

	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(5)').hide();
// 显示前N个结束-----------------------------------------------------------







	});
	// 完成·····················································
	// 
	// 点击分类显示不同分类里面的音乐之星
	var ifenlei;
	$('.fenleiCa li').click(function(event) {


		ifenlei=$(this).index();
		
		$(this).addClass('current').siblings('li').removeClass('current');
		$('.liebiaoCa').eq(ifenlei).fadeIn('fast').siblings('ul').hide();

		// 显示前N个开始-----------------------------------------------------------
		// 获取当前显示的那个ul列表的index值···························
		
		iList=6;
		$('.liebiaoShow').each(function(index, element) {
			if ($(element).is(':hidden')) {}else{
				iUl=index;
				;};
			
		});
		
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(5)').hide();
// 显示前N个结束-----------------------------------------------------------
	});
	// 完成·····················································

	// 左侧的二级菜单点击，右侧显示相应的内容·····················
	$('.mingrenPoint').click(function(event) {
		$('.mingrenPoint').addClass('current');
		$('.zhixingPoint').removeClass('current');
		$('.yinyuemingren').stop(true).show();
		$('.xinyuezhixing').stop(true).hide();
		// 显示前N个开始-----------------------------------------------------------
	// 获取当前显示的那个ul列表的index值···························
	iList=6;
	var iContent;
	$('.qzdtContent>div').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iContent=index;
			};
	});
	$('.liebiaoShow').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iUl=index;
			;};
		
	});
	
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(5)').hide();
// 显示前N个结束-----------------------------------------------------------
// 
	});
	$('.zhixingPoint').click(function(event) {
		$('.mingrenPoint').removeClass('current');
		$('.zhixingPoint').addClass('current');
		$('.yinyuemingren').stop(true).hide();
		$('.xinyuezhixing').stop(true).show();
		// 显示前N个开始-----------------------------------------------------------
	// 获取当前显示的那个ul列表的index值···························
	iList=6;
	
	$('.qzdtContent>div').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iContent=index;
			};
	});
	$('.liebiaoShow').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iUl=index;
			;};
		
	});
	
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(5)').hide();
// 显示前N个结束-----------------------------------------------------------

	


	});

	// 瀑布流下拉显示·············································
	// 
	

// 显示前N个开始-----------------------------------------------------------
	// 获取当前显示的那个ul列表的index值···························
	
	var iContent;
	$('.qzdtContent>div').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iContent=index;
			};
	});
	$('.liebiaoShow').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iUl=index;
			;};
		
	});
	
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个c
	$('.liebiaoShow').eq(iUl).children('li:gt(5)').hide();
	

// 显示前N个结束-----------------------------------------------------------
	
	$(window).scroll(function(event) {
							if ($(document).scrollTop() + $(window).height() > $(document).height() - 150) {
									 

									for (var i = iList; i < iList+3; i++) {
												console.log(i);
										$('.liebiaoShow').eq(iUl).children('li').eq(i).slideDown('');
										
										

									};

									iList=iList+3;
							};
						});


// 论坛发帖页面中的点击左侧切换版块发帖js
	// 点击左侧论坛版块 以在不同的板块发帖的js 

				$(document).ready(function() {
					var ion;
					
					$('.luntanBan').click(function(event) {
						ion=$(this).index();
						// 控制左侧的版块选择效果
						$(this).addClass('on').siblings().removeClass('on');
						// 每次点击都要把$('.fatieWrap')内部先清空
						$('.fatieWrap').empty();
						// 然后在其内部插入相应的html页面
						if (ion==0) {
							$('.fatieWrap').prepend('<iframe id="luntan01" src="luntan_bankuai01.html" frameborder="0"></iframe>')
						} else if(ion==1) {
							$('.fatieWrap').prepend('<iframe id="luntan02" src="luntan_bankuai02.html" frameborder="0"></iframe>')
						} else if (ion==2) {
							$('.fatieWrap').prepend('<iframe id="luntan03" src="luntan_bankuai03.html" frameborder="0"></iframe>')
						} else{
							$('.fatieWrap').prepend('<iframe id="luntan04" src="luntan_bankuai04.html" frameborder="0"></iframe>')
						}

						

					});





				});


		 // 点击左侧论坛版块 以在不同的板块发帖的js 




















});

